#!/usr/bin/env python

SALARY = {}
REF_BASE_SALARY = 0

'''
PI      Pension Insurance
UI      Umemployment Insurance
MI      Medical Insurance
PHF     Public Housing Fund
SJF     Special Housing Fund
'''

INCOME = '''
201107
EARNINGS & ALLOWANCES $ | DEDUCTIONS $ |
| Monthly salary 11,000.00 | PI EE Actual 880.00 |
| SH HF Bonus Payment 6.00 450.50 | UI EE Actual 110.00 |
| SHF Payment 902.00 | MI EE Actual 220.00 |
| | PHF EE Actual 770.00 |
| | Tax from salary 1,299.50 |
| ER EE | ER EE | PAY SUMMARY $ |
| PI 2,420.00 880.00 |II 55.00 | Total Gross 12,352.50 |
| UI 220.00 110.00 |BI 55.00 | Less: Stat.Ded 3,279.50 |
| MI 1,320.00 220.00 |PHF 770.00 770.00 | Less: Dedns |
| |SHF | NET PAY 9,073.00 |
pppppppppp
201108
EARNINGS & ALLOWANCES $ | DEDUCTIONS $ |
| Monthly salary 11,000.00 | PI EE Actual 880.00 |
| SH HF Bonus Payment 5.00 450.50 | UI EE Actual 110.00 |
| SHF Payment 902.00 | MI EE Actual 220.00 |
| | PHF EE Actual 770.00 |
| | Tax from salary 1,299.50 |
| ER EE | ER EE | PAY SUMMARY $ |
| PI 2,420.00 880.00 |II 55.00 | Total Gross 12,352.50 |
| UI 220.00 110.00 |BI 55.00 | Less: Stat.Ded 3,279.50 |
| MI 1,320.00 220.00 |PHF 770.00 770.00 | Less: Dedns |
| |SHF | NET PAY 9,073.00 |
pppppppppp
201109
| EARNINGS & ALLOWANCES $ | DEDUCTIONS $ |
| Monthly salary 11,000.00 | PI EE Actual 880.00 |
|*Sick Leave 1-24 0.38 | UI EE Actual 110.00 |
| SH HF Bonus Payment 4.00 450.50 | MI EE Actual 220.00 |
| SHF Payment 902.00 | PHF EE Actual 770.00 |
| | Tax from salary 964.02 |
| ER EE | ER EE | PAY SUMMARY $ |
| PI 2,420.00 880.00 |II 55.00 | Total Gross 12,352.50 |
| UI 220.00 110.00 |BI 55.00 | Less: Stat.Ded 2,944.02 |
| MI 1,320.00 220.00 |PHF 770.00 770.00 | Less: Dedns |
| |SHF | NET PAY 9,408.48 |
pppppppppp
201110
EARNINGS & ALLOWANCES $ | DEDUCTIONS $ |
| Monthly salary 11,000.00 | PI EE Actual 880.00 |
| Bonus (SMI CPA PLI) 2,252.11 | UI EE Actual 110.00 |
| SH HF Bonus Payment 3.00 450.50 | MI EE Actual 220.00 |
| SHF Payment 902.00 | PHF EE Actual 770.00 |
| | Tax from salary 819.50 |
| | Tax from bonus 67.56 |
| ER EE | ER EE | PAY SUMMARY $ |
| PI 2,420.00 880.00 |II 55.00 | Total Gross 14,604.61 |
| UI 220.00 110.00 |BI 55.00 | Less: Stat.Ded 2,867.06 |
| MI 1,320.00 220.00 |PHF 770.00 770.00 | Less: Dedns |
| |SHF | NET PAY 11,737.55
'''

PARMs = {'ref_base_salary' : 3300,
         {'PI_rate'  : (0.22, 0.08),
          'UI_rate'  : (0.02, 0.01),
          'MI_rate'  : (0.12, 0.02),
          'II_rate'  : (0.005, 0.0),
          'BI_rate'  : (0.005, 0.0),
          'PHF_rate' : (0.07, 0.07),
          'SHF_rate' : (0.08, 0.00)}}

class MonthlyIncome(object):
    def __init__(self, baseSalary=0.0):
        self.income = {'cash'      : {'pre_tax'  : float(baseSalary), 
                                      'post_tax' : 0}, 
                       'issurance' : {'PI'  : 0, 
                                      'UI'  : 0, 
                                      'MI'  : 0, 
                                      'PHF' : 0, 
                                      'SHF' : 0, 
                                      'II'  : 0,
                                      'BI'  : 0}}
        pass

    def caculateIncome(self):
        pass

    def getIncome(self):
        print 0

    def printIncomeReport(self):
        pass

def main():
    mi = MonthlyIncome(11000)
    mi.getIncom()
    pass


if __name__ == '__main__':
    main()

